<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/import.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<title>确认账户</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
		
		<link rel="stylesheet" href="${ctx}/css/reg/demo.css">
		<link rel="stylesheet" href="${ctx}/css/reg/sky-forms.css">

		<script src="${ctx}/js/md5.js"></script>
		<script src="${ctx}/js/reg/jquery.validate.min.js"></script>
		<!--[if lt IE 10]>
			<script src="${ctx}/js/reg/jquery.placeholder.min.js"></script>
		<![endif]-->	
		
		
		<script type="text/javascript">
		
		//解决ie不支持trim
		$(document).ready(
	           function(){
	                 if(!String.prototype.trim) {
	                     String.prototype.trim = function () {
	                          return this.replace(/^\s+|\s+$/g,'');
	                     };
	               }
	           }
	      );

		$(function() {
			//注册表单提交
			var regForm = '#sky-form';
			$(regForm).form({
				onSubmit : function() {
					//多层校验
					var userEname = $("#userEname").val();
					if(userEname == null || userEname.trim() == ""){
						$.messager.alert('提交结果', '用户名不能为空', 'warning');
						return false;
					}
					return true;
				},
				success : function(data) {
					var result = jQuery.parseJSON(data);
					if (result.flag == 'T') {
						window.location.href='${ctx}/passport/reg/passport-email.action';
					} else {
						$.messager.alert('提交结果', '账户不存在', 'error');
					}
				},
				error:function(data){
					$.messager.alert('提交结果', '与服务器连接失败', 'error');
				}
			});
		});
		</script>	
	</head>
	
	<body class="bg-cyan">
		<div class="body body-s">		
			<form action="${ctx}/passport/reg/chkuEname2Email.action" id="sky-form" class="sky-form" method="post" >
				<header>仅限测试展示,挖的微软的界面<a href="${ctx}">登录</a></header>
				<fieldset>					
					<section>
						<label class="input">
							<i class="icon-append icon-user"></i>
							<input type="text" name="userEname" placeholder="用户名" id="userEname" >
							<b class="tooltip tooltip-bottom-right">请输入用户名</b>
						</label>
					</section>
				</fieldset>
				<footer>
					<button type="submit" class="button" >下一步</button>
				</footer>
			</form>			
		</div>
	</body>
</html>